import request from '@/utils/request'

// 获取分类列表
export function getCategories(params) {
  return request({
    url:'/tmall_springboot/categories',
    method:'get',
    params:params,
  })
}

// 增加分类
export function addCategory(data) {
  return request({
    url:'/tmall_springboot/categories',
    method:'post',
    data:data,
    
  })
}

// 更改分类
export function editCategory(data) {
  return request({
    url:'/tmall_springboot/categories/update',
    method:'post',
    data:data,
  })
}

// 删除分类
export function deleteCategory(data) {
  return request({
    url:'/tmall_springboot/categories/del',
    method:'post',
    data:data,
  })
}

// 获取分类
export function getCategory(params) {
  return request({
    url:'/tmall_springboot/category',
    method:'get',
    params:params,
  })
}
